package org.pearl.boot.redis.sub;

import org.springframework.data.redis.connection.Message;
import org.springframework.data.redis.connection.MessageListener;
import org.springframework.stereotype.Component;

/**
 * Created by TD on 2021/5/12
 */
@Component
public class SubMsgListener implements MessageListener {

    @Override
    public void onMessage(Message message, byte[] bytes) {
        System.out.println("收到消息：" + new String(message.getBody()));
    }
}
